<%@page import="java.text.SimpleDateFormat"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!doctype html>
<html class="x-admin-sm">
	<head>
		<meta charset="UTF-8">
		<title>后台管理</title>
		<meta name="renderer" content="webkit|ie-comp|ie-stand">
		<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
		<meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
		<meta http-equiv="Cache-Control" content="no-siteapp" />
		<link rel="icon" type="image/png" href="i/buyu.ico">
		<link rel="stylesheet" href="css/fonts.css">
		<link rel="stylesheet" href="css/xadmin.css">
		<!-- <link rel="stylesheet" href="css/theme5.css"> -->
		<script src="layui/layui.js" charset="utf-8"></script>
		<script type="text/javascript" src="js/xadmin.js"></script>
		<script src="js/common/monitor_back.js"></script>
		<!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
		<!--[if lt IE 9]>
          <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
          <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
        <![endif]-->
		<script>
			// 是否开启刷新记忆tab功能
			// var is_remember = false;
		</script>
	</head>
	<body class="index">
		<!-- 顶部开始 -->
		<div class="container">
			<div class="logo">
				<a href="index">后台管理</a></div>
			<div class="left_open">
				<a><i title="展开左侧栏" class="iconfont">&#xe68a;</i></a>
			</div>
			<ul class="layui-nav left fast-add" lay-filter="">
				<li class="layui-nav-item">
					<a href="javascript:;">游戏控制</a>
					<dl class="layui-nav-child">
						<dd>
							<a id="AddChannel">
								<i class="iconfont">&#xe6a2;</i>渠道修改</a></dd>
						<dd>
							<a id="ChangeZoneState">
								<i class="iconfont">&#xe6a8;</i>区服开放|关闭</a></dd>
						<dd>
							<a id="SpecialCompetencies">
								<i class="iconfont">&#xe6a8;</i>白名单|黑名单</a></dd>
					</dl>
				</li>
			</ul>
			<ul class="layui-nav right" lay-filter="">
                <li class="layui-nav-item">
                    <a href="javascript:;">${sessionScope.Admintruename }</a>
                    <dl class="layui-nav-child">
                        <!-- 二级菜单 -->
                        <dd>
                            <a id="clear">退出登录</a></dd>
                        <dd>
                            <a id="change">更改密码</a></dd>
                    </dl>
                </li>
                <li class="layui-nav-item to-index">&nbsp;</li>
            </ul>
		</div>
		<!-- 顶部结束 -->
		<!-- 中部开始 -->
		<!-- 左侧菜单开始 -->
		<div class="left-nav">
			<div id="side-nav">
				<ul id="nav">
					<c:forEach var="s" items="${menus}">
						<li>
							<a href="javascript:;">
								<i class="iconfont left-nav-li" lay-tips=${s.detail }>${s.icon }</i>
								<cite>${s.detail }</cite>
								<i class="iconfont nav_right">&#xe658;</i></a>
							<ul class="sub-menu">
								<c:forEach var="t" items="${s.list}">
									<li>
										<a href='${t.service }' target="mainFrame">${t.detail }</a>
<%--										<a onclick="xadmin.add_tab('${t.detail }','${t.service }')">--%>
<%--											<i class="iconfont">&#xe850;</i>--%>
<%--											<cite>${t.detail }</cite></a>--%>
									</li>
								</c:forEach>
							</ul>
						</li>
					</c:forEach>
				</ul>
			</div>
		</div>
		<!-- <div class="x-slide_left"></div> -->
		<!-- 左侧菜单结束 -->
		<!-- 右侧主体开始 -->
		<div class="page-content">
			<iframe id="mainFrame" name="mainFrame" src="" style="overflow:visible;" scrolling="yes"  width="100%" height="100%"></iframe>

<%--			<div class="layui-tab tab" lay-filter="xbs_tab" lay-allowclose="false">--%>
<%--				<ul class="layui-tab-title">--%>
<%--					--%>
<%--				</ul>--%>
<%--				<div class="layui-unselect layui-form-select layui-form-selected" id="tab_right">--%>
<%--					<dl>--%>
<%--						<dd data-type="this">关闭当前</dd>--%>
<%--						<dd data-type="other">关闭其它</dd>--%>
<%--						<dd data-type="all">关闭全部</dd>--%>
<%--					</dl>--%>
<%--				</div>--%>
<%--				<div class="layui-tab-content">--%>
<%--				</div>--%>
<%--				<div id="tab_show"></div>--%>
<%--			</div>--%>
		</div>
		<div class="page-content-bg"></div>
		<style id="theme_style"></style>
		<!-- 右侧主体结束 -->
		<!-- 中部结束 -->
		<script>
		    layui.use('layer',function(){
		        var layer = layui.layer;	
		        
		        layer.config({
					extend: 'MySkin/style.css'
				});
		        var layerFrameConfig = {};//layer多个弹窗之间数据测试
			
			
		        clear.onclick = function(){
				$.ajax({
					type:'POST',
					url :'delete/out_catch',
					async:true,
					success:function(resp){
						layer.msg("操作成功 ",{icon:1});
						setTimeout(function (){
							window.location.reload();
						}, 1000)
					},
					error:function(){
						layer.msg("操作失败 ",{icon:2});
					}
				})
			}
			
			change.onclick = function(){
				if (history.state == null){
					pushHistory();
				}
				var index = layer.open({
					type: 2,
					shadeClose: true,
					shade: 0.5,
					area: ['500px', '250px'],
					title: '更改密码',
					skin: 'layer-ext-yourskin',
					content: '<%=basePath%>admin/toChangePassword',
					success: function(layero,index,resp) {
					},
					cancel:function () {
						window.history.back();
					}
				})
			}
			
			AddChannel.onclick = function(){
				if (history.state == null){
					pushHistory();
				}
				var index = layer.open({
					type: 2,
					shadeClose: true,
					shade: 0.5,
					area: ['1500px', '800px'],
					title: '修改渠道',
					skin: 'layer-ext-yourskin',
					content: '<%=basePath%>admin/toGetChannel',
					success: function(layero,index,resp) {
					},
					cancel:function () {
						window.history.back();
					}
				})
			}
			
			ChangeZoneState.onclick = function(){
				if (history.state == null){
					pushHistory();
				}
				var index = layer.open({
					type: 2,
					shadeClose: true,
					shade: 0.5,
					area: ['750px', '450px'],
					title: '修改服务器状态',
					skin: 'layer-ext-yourskin',
					content: '<%=basePath%>admin/toGetZoneState',
					success: function(layero,index,resp) {
					},
					cancel:function () {
						window.history.back();
					}
				});
			}
			
			SpecialCompetencies.onclick = function(){
				if (history.state == null){
					pushHistory();
				}
				var index = layer.open({
					type: 2,
					shadeClose: true,
					shade: 0.5,
					area: ['1500px', '800px'],
					title: '白名单|黑名单',
					skin: 'layer-ext-yourskin',
					content: 'admin/tospecialcompetencieslist',
					success: function(layero,index,resp) {
					},
					cancel:function () {
						window.history.back();
					}
				})
			}
		    });
		</script>
	</body>

</html>
